#-
# ==========================================================================
# Copyright 2010 Autodesk, Inc. All rights reserved.
#
# Use of this software is subject to the terms of the Autodesk
# license agreement provided at the time of installation or download,
# or which otherwise accompanies this software in either electronic
# or hard copy form.
# ==========================================================================
#+

#
# Include platform specific build settings
#
include buildconfig


#  Some plug-ins are only available on certain platforms.
ifeq ($(shell uname -s),Darwin)
	BLASTCMD =
	FLUIDINFOCMD = 
else
	BLASTCMD = blastCmd.$(EXT)
	FLUIDINFOCMD = fluidInfoCmd.$(EXT)
endif


plugins:	qtPlugins				\
		affectsNode.$(EXT)			\
		animCubeNode.$(EXT)			\
		animExportUtil.$(EXT)			\
		animInfoCmd.$(EXT)			\
		anisotropicShader.$(EXT)		\
		apiMeshShape.$(EXT)			\
		apiSimpleShape.$(EXT)			\
		arcLenNode.$(EXT)			\
		backfillShader.$(EXT)			\
		$(BLASTCMD)				\
		blindComplexDataCmd.$(EXT)		\
		blindDataShader.$(EXT)			\
		blindDoubleDataCmd.$(EXT)		\
		blindShortDataCmd.$(EXT)		\
		brickShader.$(EXT)			\
		buildRotationNode.$(EXT)		\
		cellShader.$(EXT)			\
		checkerShader.$(EXT)			\
		circleNode.$(EXT)			\
		clothPaintAttrCmd.$(EXT)        	\
		closestPointCmd.$(EXT)      	  	\
		closestPointOnCurve.$(EXT)		\
		closestPointOnNurbsSurfaceCmd.$(EXT)	\
		clusterWeightFunction.$(EXT)		\
		componentScaleManip.$(EXT)		\
		compositingShader.$(EXT)		\
		conditionTest.$(EXT)			\
		contrastShader.$(EXT)			\
		convertBumpCmd.$(EXT)			\
		convertEdgesToFacesCmd.$(EXT)		\
		convertVerticesToEdgesCmd.$(EXT)	\
		convertVerticesToFacesCmd.$(EXT)	\
		createClipCmd.$(EXT)			\
		curvedArrowsNode.$(EXT)			\
		customAttrManip.$(EXT)			\
		customImagePlane.$(EXT)			\
		cvColorNode.$(EXT)			\
		cvColorShader.$(EXT)			\
		cvExpandCmd.$(EXT)			\
		cvPosCmd.$(EXT)				\
		dagMessageCmd.$(EXT)			\
		dagPoseInfoCmd.$(EXT)			\
		deletedMsgCmd.$(EXT)			\
		depthShader.$(EXT)			\
		displacementShader.$(EXT)		\
		dynExprField.$(EXT)			\
		eventTest.$(EXT)			\
		exampleCameraSetView.$(EXT)		\
		exampleMRampAttribute.$(EXT)		\
		exCameraSet.$(EXT)			\
		exportJointClusterDataCmd.$(EXT)	\
		exportSkinClusterDataCmd.$(EXT)		\
		fileIOMsgCmd.$(EXT)			\
		filteredAsciiFile.$(EXT)		\
		findFileTexturesCmd.$(EXT)		\
		findTexturesPerPolygonCmd.$(EXT)	\
		flameShader.$(EXT)			\
		flipUVCmd.$(EXT)			\
		$(FLUIDINFOCMD)				\
		footPrintManip.$(EXT)			\
		footPrintNode.$(EXT)			\
		fullLoftNode.$(EXT)			\
		gammaShader.$(EXT)			\
		genericAttributeNode.$(EXT)		\
		geometrySurfaceConstraint.$(EXT)	\
		geomShader.$(EXT)			\
		geometryCacheConverter.$(EXT)		\
		getAttrAffectsCmd.$(EXT)		\
		hairCollisionSolver.$(EXT)		\
		helix2Cmd.$(EXT)			\
		helixCmd.$(EXT)				\
		helixTool.$(EXT)			\
		helloCmd.$(EXT)				\
		helloWorldCmd.$(EXT)			\
		hwColorPerVertexShader.$(EXT)		\
		hwManagedTextureShader.$(EXT)		\
		hwPhongShader.$(EXT)			\
		hwRenderPostEffect.$(EXT)		\
		hwUnlitShader.$(EXT)			\
		idleTest.$(EXT)				\
		iffInfoCmd.$(EXT)			\
		iffPixelCmd.$(EXT)			\
		iffPpmCmd.$(EXT)			\
		instanceCallbackCmd.$(EXT)		\
		instancerListCmd.$(EXT)			\
		interpShader.$(EXT)			\
		intersectCmd.$(EXT)			\
		intersectOnNurbsSurfaceCmd.$(EXT)	\
		jitterNode.$(EXT)			\
		lambertShader.$(EXT)			\
		lassoTool.$(EXT)			\
		latticeNoise.$(EXT)			\
		lavaShader.$(EXT)			\
		lepTranslator.$(EXT)			\
		lightShader.$(EXT)			\
		lineManip.$(EXT) 			\
		lineManipContainer.$(EXT)		\
		listLightLinksCmd.$(EXT)		\
		listPolyHolesCmd.$(EXT)			\
		listRichSelectionCmd.$(EXT)		\
		lockEvent.$(EXT)			\
		manipOverride.$(EXT)			\
		marqueeTool.$(EXT)			\
		maTranslator.$(EXT)			\
		meshOpCmd.$(EXT)			\
		meshReorderCmd.$(EXT)			\
		mixtureShader.$(EXT)			\
		motionPathCmd.$(EXT)			\
		motionTraceCmd.$(EXT)			\
		moveCurveCVsCmd.$(EXT)			\
		moveNumericTool.$(EXT)			\
		moveTool.$(EXT)				\
		moveManip.$(EXT)			\
		multiCurveNode.$(EXT)			\
		multiPlugInfoCmd.$(EXT)			\
		narrowPolyViewer.$(EXT)			\
		nodeCreatedCBCmd.$(EXT)			\
		nodeInfoCmd.$(EXT)			\
		nodeMessageCmd.$(EXT)			\
		noiseShader.$(EXT)			\
		offsetNode.$(EXT)			\
		OpenGLViewportRenderer.$(EXT)		\
		ownerEmitter.$(EXT)			\
		particleAttrNode.$(EXT)			\
		particlePathsCmd.$(EXT)			\
		particleSystemInfoCmd.$(EXT)		\
		peltOverlapCmd.$(EXT)			\
		pfxInfoCmd.$(EXT)			\
		phongShader.$(EXT)			\
		pickCmd.$(EXT)				\
		pluginCallbacks.$(EXT)			\
		pnTrianglesNode.$(EXT)			\
		pointOnMeshInfo.$(EXT)			\
		pointOnSubdNode.$(EXT)			\
		polyMessageCmd.$(EXT)			\
		polyRawExporter.$(EXT) 			\
		polyPrimitiveCmd.$(EXT)			\
		polyTrgNode.$(EXT)			\
		polyX3DExporter.$(EXT) 			\
		progressWindowCmd.$(EXT)		\
		quadricShape.$(EXT)			\
		referenceQueryCmd.$(EXT)		\
		renderAccessNode.$(EXT)			\
		renderViewInteractiveRenderCmd.$(EXT)	\
		renderViewRenderCmd.$(EXT)		\
		renderViewRenderRegionCmd.$(EXT)	\
		richMoveCmd.$(EXT)			\
		rockingTransform.$(EXT)			\
		rockingTransformCheck.$(EXT)		\
		rotateManip.$(EXT)			\
		sampleCmd.$(EXT)			\
		sampleParticles.$(EXT)			\
		scanDagCmd.$(EXT)			\
		scanDagSyntax.$(EXT)			\
		shadowMatteShader.$(EXT)		\
		shellNode.$(EXT)			\
		shiftNode.$(EXT)			\
		simpleEmitter.$(EXT)			\
		simpleFluidEmitter.$(EXT)		\
		simpleImageFile.$(EXT)			\
		simpleLoftNode.$(EXT)			\
		simpleSolverNode.$(EXT)			\
		simpleSpring.$(EXT)			\
		sineNode.$(EXT)				\
		slopeShader.$(EXT)			\
		solidCheckerShader.$(EXT)		\
		spiralAnimCurveCmd.$(EXT)		\
		splatDeformer.$(EXT)			\
		splitUVCmd.$(EXT)			\
		squareScaleManip.$(EXT)			\
		squareScaleManipContext.$(EXT)		\
		sseDeformer.$(EXT)			\
		stringFormatNode.$(EXT)			\
		surfaceBumpManip.$(EXT)			\
		surfaceCreateCmd.$(EXT)			\
		surfaceTwistCmd.$(EXT)			\
		sweptEmitter.$(EXT)			\
		swissArmyManip.$(EXT)			\
		testCameraSetCmd.$(EXT)			\
		testNobjectNode.$(EXT)			\
		testNucleusNode.$(EXT)			\
		threadedBoundingBox.$(EXT)		\
		threadingLockTests.$(EXT)		\
		threadTestCmd.$(EXT)			\
		threadTestWithLocksCmd.$(EXT)		\
		torusField.$(EXT)			\
		transCircleNode.$(EXT)			\
		translateCmd.$(EXT)			\
		userMsgCmd.$(EXT)			\
		viewCallbackTest.$(EXT)			\
		viewCaptureCmd.$(EXT)			\
		volumeLightCmd.$(EXT)			\
		volumeShader.$(EXT)			\
		weightListNode.$(EXT)			\
		whatisCmd.$(EXT)			\
		XmlGeometryCache.$(EXT)			\
		yTwistNode.$(EXT)			\
		zoomCameraCmd.$(EXT)

#  Pre-built binaries of the following plugins are shipped with Maya. We
#  don't want to build them by default with all the others because then
#  there would be two versions of the same plugin and unless you know
#  exactly what you are doing the wrong one might get loaded. So if you
#  want to build one of these you must do so explicitly. E.g:
#
#		make animImportExport.so
#
prebuiltPlugins:				\
 		animImportExport.$(EXT)		\
 		cleanPerFaceAssignment.$(EXT)	\
		objExport.$(EXT)


#  The following plugins require the 'nvparse' library from nVIDIA.
#  (http://developer.nvidia.com/object/nvparse.html)
#
#  Set the NVPARSE variable in buildconfig to the directory where nvparse
#  is installed.
nvparsePlugins:	$(NVPARSE)					\
		hwAnisotropicShader_NV20.$(EXT)		\
		hwDecalBumpShader_NV20.$(EXT)		\
		hwReflectBumpShader_NV20.$(EXT)		\
		hwRefractReflectShader_NV20.$(EXT)	\
		hwToonShader_NV20.$(EXT)

#  The following plugins require third-party packages to build so we do not
#  build them by default with all of the others.
thirdPartyPlugins:				\
		ribExport.$(EXT)

qtPlugins:
	$(MAKE) -f Makefile.qt


depend:
	makedepend $(INCLUDES) -I/usr/include/CC *.cc

clean:
	-rm -f *.o
	$(MAKE) -f Makefile.qt clean

Clean:
	-rm -f *.o *.so *.lib *.bak *.bundle
	$(MAKE) -f Makefile.qt Clean


##################
# Generic Rules  #
##################

%.o :	%.c
	$(CC) -c $(INCLUDES) $(CFLAGS) $<
	
%.o :	%.cc
	$(C++) -c $(INCLUDES) $(C++FLAGS) $<

%.o :	%.cpp
	$(C++) -c $(INCLUDES) $(C++FLAGS) $<

%.i :	%.cc
	$(C++) -E $(INCLUDES) $(C++FLAGS) $*.cc > $*.i

%.$(EXT) :	%.c
	-rm -f $@
	$(CC) -o $@ $(INCLUDES) $(CFLAGS) $< $(LFLAGS) $(LIBS)

%.$(EXT) :	%.cc
	-rm -f $@
	$(C++) -o $@ $(INCLUDES) $(C++FLAGS) $< $(LFLAGS) $(LIBS)

%.$(EXT) :	%.cpp
	-rm -f $@
	$(C++) -o $@ $(INCLUDES) $(C++FLAGS) $< $(LFLAGS) $(LIBS)

%.$(EXT) :	%.o
	-rm -f $@
	$(LD) -o $@ $< $(LIBS)


##################
# Specific Rules #
##################

#  The generic rules will handle building a plugin which consists of a
#  single source file so we only need rules here for plugins which have
#  multiple source files or require additional libraries.

animExportUtil.$(EXT):	animExportUtil.o animFileExport.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

animImportExport.$(EXT): animImportExport.o animFileUtils.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

animInfoCmd.$(EXT):	animInfoCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

apiMeshShape.$(EXT):	apiMeshShape.o apiMeshShapeUI.o apiMeshGeom.o	\
			apiMeshData.o apiMeshCreator.o apiMeshIterator.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

apiSimpleShape.$(EXT):	apiSimpleShape.o apiSimpleShapeIterator.o \
			apiSimpleShapeUI.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI $(LIBS_GL_EXTRA)

blastCmd.$(EXT):	blastCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaAnim -lImage

blindDataShader.$(EXT):	blindDataMesh.o blindDataShader.o \
			blindDataPluginMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

cleanPerFaceAssignment.$(EXT):	cleanPerFaceAssignmentCmd.o \
				cleanPerFaceAssignmentPluginMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

clusterWeightFunction.$(EXT):	clusterWeightFunction.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

closestPointOnCurve.$(EXT):	closestPointOnCurveCmd.o	\
				closestPointOnCurveNode.o	\
				closestPointOnCurvePlugin.o	\
				closestTangentUAndDistance.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

componentScaleManip.$(EXT):	componentScaleManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

createClipCmd.$(EXT):	createClipCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

curvedArrowsNode.$(EXT): curvedArrowsNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

customAttrManip.$(EXT):	customAttrManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

cvColorNode.$(EXT):	cvColorNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

cvColorShader.$(EXT):	cvColorShader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaRender

exampleCameraSetView.$(EXT):	exampleCameraSetViewMain.o \
				exampleCameraSetView.o \
				exampleCameraSetViewCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

exCameraSet.$(EXT):	exCameraSet.o testExCameraSetCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMaya

exportJointClusterDataCmd.$(EXT): exportJointClusterDataCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

dynExprField.$(EXT): dynExprField.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

exportSkinClusterDataCmd.$(EXT): exportSkinClusterDataCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

flipUVCmd.$(EXT):	flipUVCmd.o flipUVMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)
	
fluidInfoCmd.$(EXT):	fluidInfoCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

footPrintManip.$(EXT):	footPrintManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

footPrintNode.$(EXT):	footPrintNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

geometrySurfaceConstraint.$(EXT):	geometrySurfaceConstraint.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

geometryCacheConverter.$(EXT):	geometryCacheConverter.o	\
				geometryCacheBlockBase.o	\
				geometryCacheBlockDVAData.o	\
				geometryCacheBlockFVAData.o	\
				geometryCacheBlockIntData.o	\
				geometryCacheBlockStringData.o	\
				geometryCacheFile.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

hairCollisionSolver.$(EXT):	hairCollisionSolver.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaFX

helixTool.$(EXT):	helixTool.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

HW_SHADER_COMMON = MNormalMapConverter.o MTexture.o MTextureCache.o \
		   NodeMonitor.o ShadingConnection.o

hwAnisotropicShader_NV20.$(EXT): hwAnisotropicShader_NV20.o $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

hwColorPerVertexShader.$(EXT):	hwColorPerVertexShader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)  -lOpenMayaUI -lOpenMayaRender

hwDecalBumpShader_NV20.$(EXT): hwDecalBumpShader_NV20.o $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

hwManagedTextureShader.$(EXT): hwManagedTextureShader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)  -lOpenMayaUI -lOpenMayaRender

hwPhongShader.$(EXT):	hwPhongShader.o hwPhongShaderBehavior.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI -lOpenMayaRender

hwReflectBumpShader_NV20.$(EXT): hwReflectBumpShader_NV20.o $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

hwRefractReflectShader_NV20.$(EXT): hwRefractReflectShader_NV20.o \
				    $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

hwRenderPostEffect.$(EXT): hwRenderPostEffect.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaRender $(LIBS_GL_EXTRA)

hwToonShader_NV20.$(EXT): hwToonShader_NV20.o $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

hwUnlitShader.$(EXT): hwUnlitShader.o $(HW_SHADER_COMMON)
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)  -lOpenMayaUI

idleTest.$(EXT):	idleTest.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

iffInfoCmd.$(EXT):	iffInfoCmd.o iffreader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lImage

iffPixelCmd.$(EXT):	iffPixelCmd.o iffreader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lImage

iffPpmCmd.$(EXT):	iffPpmCmd.o iffreader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lImage

instancerListCmd.$(EXT): instancerListCmd.o 
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

jlcVcrDevice.$(EXT):	jlcVcrDevice.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

lassoTool.$(EXT):	lassoTool.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

latticeNoise.$(EXT):	latticeNoise.o latticeNoiseCmd.o latticeNoiseNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

lensDistortionCallback.$(EXT): lensDistortionCallback.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)  -lOpenMayaUI -lOpenMayaRender

lineManip.$(EXT):	lineManip.o manipulatorMath.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

lineManipContainer.$(EXT): lineManipContainer.o manipulatorMath.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

listLightLinksCmd.$(EXT): listLightLinksCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaRender

listRichSelectionCmd.$(EXT): listRichSelectionCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

manipOverride.$(EXT):	manipOverride.o \
			customTriadManip.o \
			rockingTransform2.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

marqueeTool.$(EXT):	marqueeTool.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

meshOpCmd.$(EXT):	meshOpCmd.o meshOpFty.o meshOpFtyAction.o	\
			meshOpMain.o meshOpNode.o \
			polyModifierNode.o polyModifierCmd.o polyModifierFty.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

meshReorderCmd.$(EXT):	meshReorderCmd.o meshReorderTool.o meshRemapCmd.o \
			meshRemapTool.o meshMapUtils.o meshReorderPlugin.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

motionPathCmd.$(EXT):	motionPathCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

moveNumericTool.$(EXT):	moveNumericTool.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

moveTool.$(EXT):	moveTool.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

moveManip.$(EXT):	moveManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

multiPlugInfoCmd.$(EXT): multiPlugInfoCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMaya

narrowPolyViewer.$(EXT): narrowPolyViewerCmd.o narrowPolyViewer.o \
			 narrowPolyViewerMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI $(LIBS_GL_EXTRA)

nodeCreatedCBCmd.$(EXT): nodeCreatedCBCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

objExport.$(EXT):	objExport.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaAnim

offsetNode.$(EXT):	offsetNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

OpenGLViewportRenderer.$(EXT):	OpenGLViewportRenderer.o \
				OpenGLViewportRendererPlugin.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaRender -lOpenMayaUI

ownerEmitter.$(EXT):	ownerEmitter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

particlePathsCmd.$(EXT): particlePathsCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

particleSystemInfoCmd.$(EXT): particleSystemInfoCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

particleAttrNode.$(EXT): particleAttrNode.o particleAttrNodeMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

pfxInfoCmd.$(EXT):	pfxInfoCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

phongShader.$(EXT):	phongShader.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaRender

pnTrianglesNode.$(EXT): pnTrianglesNode.o ATIext.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)  -lOpenMayaUI

pointOnMeshInfo.$(EXT):	getPointAndNormal.o pointOnMeshCmd.o	\
			pointOnMeshInfoNode.o pointOnMeshInfoPlugin.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)
	
polyRawExporter.$(EXT):	polyExporter.o  polyRawExporter.o  polyRawWriter.o \
			polyWriter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) 

polyX3DExporter.$(EXT): polyExporter.o polyWriter.o polyX3DExporter.o \
			polyX3DWriter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) 

progressWindowCmd.$(EXT): progressWindowCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

quadricShape.$(EXT):	quadricShape.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)  $(LIBS_GL_EXTRA) -lOpenMayaUI

renderAccessNode.$(EXT): renderAccessNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaRender

renderViewInteractiveRenderCmd.$(EXT): renderViewInteractiveRenderCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

renderViewRenderCmd.$(EXT): renderViewRenderCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

renderViewRenderRegionCmd.$(EXT): renderViewRenderRegionCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

ribExport.$(EXT): ribExport.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaAnim \
		-L$(RMANTREE)/lib -lrib -ltarget -lprmutil -lzip

ribExport.o: ribExport.cpp
	$(C++) -c $(INCLUDES) -I$(RMANTREE)/include $(C++FLAGS) $<

richMoveCmd.$(EXT): richMoveCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

rockingTransform.$(EXT): rockingTransform.o rockingTransformMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

rockingTransformCheck.$(EXT):	rockingTransform.o rockingTransformCheck.o \
				rockingTransformCheckMain.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

rotateManip.$(EXT):	rotateManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

sampleCmd.$(EXT):	sampleCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

sampleParticles.$(EXT):	sampleParticles.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

simpleEmitter.$(EXT):	simpleEmitter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX -lOpenMayaUI $(LIBS_GL_EXTRA) 

simpleFluidEmitter.$(EXT): simpleFluidEmitter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

simpleImageFile.$(EXT): simpleImageFile.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA)

simpleSolverNode.$(EXT): simpleSolverNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

simpleSpring.$(EXT):	simpleSpring.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

slopeShader.$(EXT):	slopeShader.o slopeShaderBehavior.o slopeShaderNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

spiralAnimCurveCmd.$(EXT): spiralAnimCurveCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

splatDeformer.$(EXT): splatDeformer.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

splitUVCmd.$(EXT):	splitUVCmd.o  polyModifierCmd.o polyModifierNode.o \
              		polyModifierFty.o splitUVFty.o splitUVFtyAction.o \
              		splitUVMain.o splitUVNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS)

squareScaleManip.$(EXT): squareScaleManip.o manipulatorMath.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

squareScaleManipContext.$(EXT): squareScaleManipContext.o manipulatorMath.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI -lOpenMayaRender

sseDeformer.$(EXT): sseDeformer.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

surfaceBumpManip.$(EXT): surfaceBumpManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

sweptEmitter.$(EXT):	sweptEmitter.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

swissArmyManip.$(EXT):	swissArmyManip.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

testNobjectNode.$(EXT):	testNobjectNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

testNucleusNode.$(EXT):	testNucleusNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX

torusField.$(EXT):	torusField.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaFX -lOpenMayaUI $(LIBS_GL_EXTRA)

undoRedoMsgCmd.$(EXT):	undoRedoMsgCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

viewCallbackTest.$(EXT): viewCallbackTest.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI

viewCaptureCmd.$(EXT):	viewCaptureCmd.o viewCapturePPM.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) $(LIBS_GL_EXTRA) -lOpenMayaUI

yTwistNode.$(EXT):	yTwistNode.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaAnim

zoomCameraCmd.$(EXT):	zoomCameraCmd.o
	-rm -f $@
	$(LD) -o $@ $^ $(LIBS) -lOpenMayaUI


